package com.briup.ch13;

import com.briup.ch08.Demo;

import java.io.Serializable;

/**
 * @Author briup-adam
 * @Date 2023/10/30 上午10:24
 * @Description 测试用实体类
 **/
@Demo(name = "adam")
public class Cat implements Serializable {
    static final long serialVersionUID = 42L;
    private String name;
    protected int age;
    String color;
    public String kind;

    private String getName() {
        return name;
    }

    protected int getAge() {
        return age;
    }

    String getColor() {
        return color;
    }

    public String getKind() {
        return kind;
    }

    public Cat(String name, int age, String color, String kind) {
        this.name = name;
        this.age = age;
        this.color = color;
        this.kind = kind;
    }

    protected Cat(String name, int age, String color) {
        this.name = name;
        this.age = age;
        this.color = color;
    }

    Cat(String name, int age) {
        this.name = name;
        this.age = age;
    }

    private Cat(String name) {
        this.name = name;
    }

    @Override
    public final String toString() {
        return "Cat{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", color='" + color + '\'' +
                ", kind='" + kind + '\'' +
                '}';
    }

    public Cat() {
    }

    private static void show(String text) {
        System.out.println(text);
    }
}
